package app.fugema.shop.main.home.adapter;


import android.view.View;
import android.widget.ImageView;

import com.base.common.utils.LogUtil;
import com.base.common.utils.UIUtils;
import com.base.common.view.widget.imageView.GlideImageView;
import com.base.common.view.widget.imageView.ShapeImageView;
import com.bumptech.glide.Glide;
import com.zhpan.bannerview.holder.ViewHolder;

import app.fugema.shop.R;
import app.fugema.shop.main.home.model.HomeData;

public class NetBannerProvider implements ViewHolder<HomeData.DatasetBean>
{

    @Override
    public int getLayoutId()
    {
        return R.layout.item_banner_img_view;
    }

    @Override
    public void onBind(View itemView, HomeData.DatasetBean data, int position, int size)
    {

        GlideImageView imageView = itemView.findViewById(R.id.iv_banner_img);
        if(UIUtils.isNotEmpty( data.getPic() ))
        {
            //LogUtil.e("pic = " + data.getPic());
            //ImageLoaderUtils.loadImage(imageView , data.getPic() ,true );
            imageView.loadUrl(data.getPic() );
        }
    }
}
